package model;

import java.util.ArrayList;
import java.util.Observable;
import java.util.Observer;

public class WheatherData extends Observable
{
	private float temperature;
	private float humidity;
	private float pressure;
	private ArrayList<Observer> obseverList;
	
	public WheatherData(int temperature, int humidity, int pressure) 
	{
		super();
		this.temperature = temperature;
		this.humidity = humidity;
		this.pressure = pressure;
		this.obseverList = new ArrayList<Observer>();
	}

	public void measurementsChanged() 
	{	
		this.setChanged();
		this.notifyObservers();
	}

	public void setMesurements(float temperature, float humidity, float pressure)
	{
		this.temperature = temperature;
		this.humidity = humidity;
		this.pressure = pressure;
		measurementsChanged();
	}

	@Override
	public String toString() {
		return "WheatherData [humidity=" + humidity + ", pressure=" + pressure + ", temperature="+ temperature + "]";
	}
	
	
}
